package views.activity;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class SearchCurriculumActivityView extends JPanel {

	public JTextField txtTitle;
	public JTextField txtType;
	public JComboBox<String> cmbMonthStart;
	public JComboBox<Integer> cmbDayStart;
	public JComboBox<Integer> cmbYearStart;
	public JComboBox<String> cmbMonthEnd;
	public JComboBox<Integer> cmbDayEnd;
	public JComboBox<Integer> cmbYearEnd;
	public JTextField txtCourseCode;
	public JTextField txtBeneficiary;
	public JTextArea txaRemark;
	public JButton btnClear;
	public JButton btnSearch;
	
	public SearchCurriculumActivityView() {
		this.setSize(730, 379);
		this.setLayout(null);
		
		JLabel lblSearchBy = new JLabel("Search by...");
		lblSearchBy.setFont(new Font("Arial", Font.PLAIN, 15));
		lblSearchBy.setBounds(10, 10, 350, 30);
		this.add(lblSearchBy);
		
		JLabel lblAddValuesOnly = new JLabel("Add values only to the ones you want to search.");
		lblAddValuesOnly.setHorizontalAlignment(SwingConstants.RIGHT);
		lblAddValuesOnly.setFont(new Font("Arial", Font.PLAIN, 12));
		lblAddValuesOnly.setBounds(370, 10, 350, 20);
		add(lblAddValuesOnly);
		
		JPanel panelLeft = new JPanel();
		panelLeft.setBounds(10, 48, 350, 320);
		panelLeft.setLayout(null);
		this.add(panelLeft);
		
		JPanel panelRight = new JPanel();
		panelRight.setBounds(370, 48, 350, 320);
		panelRight.setLayout(null);
		this.add(panelRight);
		
		JLabel lblActivityTitle = new JLabel("Activity Title");
		lblActivityTitle.setFont(new Font("Arial", Font.PLAIN, 12));
		lblActivityTitle.setBounds(10, 10, 330, 20);
		panelLeft.add(lblActivityTitle);
		
		JLabel lblActivityType = new JLabel("Activity Type");
		lblActivityType.setFont(new Font("Arial", Font.PLAIN, 12));
		lblActivityType.setBounds(10, 60, 330, 20);
		panelLeft.add(lblActivityType);
		
		JLabel lblDateStart = new JLabel("Date Start");
		lblDateStart.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateStart.setBounds(10, 110, 330, 20);
		panelLeft.add(lblDateStart);
		
		JLabel lblDateEnd = new JLabel("Date End");
		lblDateEnd.setFont(new Font("Arial", Font.PLAIN, 12));
		lblDateEnd.setBounds(10, 160, 330, 20);
		panelLeft.add(lblDateEnd);
		
		JLabel lblCourseCode = new JLabel("Course Code");
		lblCourseCode.setFont(new Font("Arial", Font.PLAIN, 12));
		lblCourseCode.setBounds(10, 10, 330, 20);
		panelRight.add(lblCourseCode);
		
		JLabel lblBeneficiaryName = new JLabel("Beneficiary Name");
		lblBeneficiaryName.setFont(new Font("Arial", Font.PLAIN, 12));
		lblBeneficiaryName.setBounds(10, 60, 330, 20);
		panelRight.add(lblBeneficiaryName);
		
		JLabel lblRemark = new JLabel("Remark");
		lblRemark.setFont(new Font("Arial", Font.PLAIN, 12));
		lblRemark.setBounds(10, 110, 330, 20);
		panelRight.add(lblRemark);
		
		txtTitle = new JTextField();
		txtTitle.setBounds(10, 30, 330, 20);
		panelLeft.add(txtTitle);
		txtTitle.setColumns(10);
		
		txtType = new JTextField();
		txtType.setColumns(10);
		txtType.setBounds(10, 80, 330, 20);
		panelLeft.add(txtType);
		
		cmbMonthStart = new JComboBox<String>();
		cmbMonthStart.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthStart.setBounds(10, 130, 181, 20);
		panelLeft.add(cmbMonthStart);
		
		cmbDayStart = new JComboBox<Integer>();
		cmbDayStart.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayStart.setBounds(201, 130, 50, 20);
		panelLeft.add(cmbDayStart);
		
		cmbYearStart = new JComboBox<Integer>();
		cmbYearStart.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearStart.setBounds(260, 130, 80, 20);
		panelLeft.add(cmbYearStart);
		
		cmbMonthEnd = new JComboBox<String>();
		cmbMonthEnd.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbMonthEnd.setBounds(10, 180, 181, 20);
		panelLeft.add(cmbMonthEnd);
		
		cmbDayEnd = new JComboBox<Integer>();
		cmbDayEnd.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbDayEnd.setBounds(201, 180, 50, 20);
		panelLeft.add(cmbDayEnd);
		
		cmbYearEnd = new JComboBox<Integer>();
		cmbYearEnd.setFont(new Font("Arial", Font.PLAIN, 12));
		cmbYearEnd.setBounds(260, 180, 80, 20);
		panelLeft.add(cmbYearEnd);
		
		txtCourseCode = new JTextField();
		txtCourseCode.setColumns(10);
		txtCourseCode.setBounds(10, 30, 330, 20);
		panelRight.add(txtCourseCode);
		
		txtBeneficiary = new JTextField();
		txtBeneficiary.setColumns(10);
		txtBeneficiary.setBounds(10, 80, 330, 20);
		panelRight.add(txtBeneficiary);
		
		JScrollPane scpRemark = new JScrollPane();
		scpRemark.setBounds(10, 130, 330, 70);
		panelRight.add(scpRemark);
		
		txaRemark = new JTextArea();
		txaRemark.setFont(new Font("Arial", Font.PLAIN, 12));
		scpRemark.setViewportView(txaRemark);
		
		btnClear = new JButton("Clear");
		btnClear.setFont(new Font("Arial", Font.PLAIN, 12));
		btnClear.setBounds(160, 283, 85, 25);
		panelRight.add(btnClear);
		
		btnSearch = new JButton("Search");
		btnSearch.setBounds(255, 283, 85, 25);
		panelRight.add(btnSearch);
		btnSearch.setFont(new Font("Arial", Font.PLAIN, 12));
	}
}
